//
//  ViewController.m
//  UI01_UIViewHomework
//
//  Created by dllo on 16/6/3.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

//-(instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil{
//    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
//    if(self){
//        NSLog(@"%d,%s",__LINE__,__FUNCTION__);
//    }
//    return self;
//}
//
//-(instancetype)init{
//    self = [super init];
//    if(self){
//        NSLog(@"%d,%s",__LINE__,__FUNCTION__);
//    }
//    return self;
//}


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.view.backgroundColor = [UIColor whiteColor];
    UIView *view1 = [[UIView alloc] initWithFrame:CGRectMake(0, 20, 50, 50)];
    view1.backgroundColor = [UIColor redColor];
    [self.view addSubview:view1];
    [view1 release];
    
    UIView *view2 = [[UIView alloc] initWithFrame:CGRectMake(50, 20, 50, 50)];
    view2.backgroundColor = [UIColor yellowColor];
    [self.view addSubview:view2];
    [view2 release];
    
    UIView *view3 = [[UIView alloc] initWithFrame:CGRectMake(100, 20, 50, 50)];
    view3.backgroundColor = [UIColor blueColor];
    [self.view addSubview:view3];
    [view3 release];
    
    UIView *view4 = [[UIView alloc] initWithFrame:CGRectMake(150, 20, 50, 50)];
    view4.backgroundColor = [UIColor greenColor];
    [self.view addSubview:view4];
    [view4 release];
    
    UIView *view5 = [[UIView alloc] initWithFrame:CGRectMake(200, 20, 50, 50)];
    view5.backgroundColor = [UIColor blackColor];
    [self.view addSubview:view5];
    [view5 release];
    
    
    
    
}






- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
